import request from '@/utils/request'
//好友列表
export const getFriendsService = () => {
        return request.get('/chat/getFriends')
    }
    // 验证消息
export const getVerifyMsgService = () => {
    return request.get('chat/getVerifyMsg')
}

//获取对话列表
export const getNowChatListService = () => {
        return request.get('/chat/getNowChatList')
    }
    //从对话列表中删除
export const removeNowChatService = (id) => {
        return request.get('/chat/removeNowChat', { params: { id: id } })
    }
    //添加进对话列表
export const addNowChatService = (id) => {
        console.log('添加进对话列表', id)
        return request.get('/chat/addNowChat', { params: { id: id } })
    }
    //获取离线消息
export const getOffLineMsgService = () => {
        return request.get('/chat/single/getOfflineMsg');
    }
    //发送消息(单聊)
export const sendMsgService = (data) => {
        return request.post('/chat/single/send', data)
    }
    //删除好友
export const delFriendService = (id) => {
    return request.get('/chat//del/friend', { params: { id: id } })
}